Ext.ns('TaxonTagger');
TaxonTagger.addNames = function(config){
	Ext.apply(this, config, {
			width: 400
		,	height: 300
		,	modal: true
		,	iconCls: 'icon_txt'
		,	resizable: false
		,	defaults: {
					padding: 5
				,	border: false
			}
		,	plain: true
		,	closable: true
		,	items: [{
					html: this.txtDirection
				,	height: 40	
			},{
					xtype: 'textarea'
				,	width: 383
				,	height: 192
				,	ref: 'reftxtNames'
				,	allowBlank: false
				,	scope: this
				,	listeners: {
						render: function(me){
							me.el.focus.defer(150, me.el);
						}
					}
			}]
		,	buttonAlign: 'left'		
		,	buttons: [{
					text: this.txtClearName
				,	scope: this	
				,	handler: function(){
						this.reftxtNames.setValue("");
						this.reftxtNames.el.focus.defer(150, this.reftxtNames.el);
					}
			}, '->', {
					text: this.txtSaveClose
				,	scope: this
				,	iconCls: 'icon_txt'
				,	handler: function(){
						var namesStr = this.reftxtNames.getValue().trim();
						if (Ext.isEmpty(namesStr)) {
								TaxonTagger.Notice.msg('Notice', 'Please enter names');
						}else {
							Ext.getCmp('nubPanel').fireEvent('addNames', namesStr, this);
							this.close();
						}
					}
			}, {
					text: this.txtClose
				,	scope: this
				,	handler: function(){
						this.close();
					}	
			}]
	});
	
	TaxonTagger.addNames.superclass.constructor.call(this, config);
	
};

Ext.extend(TaxonTagger.addNames, Ext.Window, {});